<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>用户管理</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <link rel="stylesheet" href="${ctx}/assets/plugins/layui/css/layui.css"  media="all">
  <script src="${ctx}/assets/plugins/layui/layui.js"></script>
  <script src="${ctx}/assets/js/app.js"></script>
  <!-- 注意：如果你直接复制所有代码到本地，上述css路径需要改成你本地的 -->
</head>
<body>
<table lay-filter="loginUserTab"  id="loginUserTab"></table>

<!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 --> 
 
<script>
layui.use('table', function(){
  var table = layui.table;
  var $ = layui.$;
  table.render({
    elem: '#loginUserTab'
    ,url: '${ctx}/sysUser/information?pkId=${loginUser.pkId}' //数据接口
    ,method : 'post'
    ,cols: [[
      {field:'loginName', align:'center', width:150, title: '账号'}
      ,{field:'userName', align:'center', width:150, title: '用户名'}
      ,{field:'userType', align:'center', width:150, title: '用户角色'}
      ,{field:'departmentName', align:'center', width:150, title: '所属部门'}
      ,{field:'tel', align:'center', width:150, title: '联系电话'}
      ,{field:'email', align:'center', width:180, title: '电子邮箱'}
      ,{field:'qq', align:'center', width:150, title: 'QQ'}
      ,{field:'state', align:'center', width:150, title: '是否在职'}
      ,{fixed: 'right',title:'操作', width:260, align:'center', toolbar: '#barDemo'}
    ]]
    ,id: 'loginUserTab'
  });
//监听工具条
table.on('tool(loginUserTab)', function(obj){
  var data = obj.data;
   if(obj.event === 'editPassword'){
	openForm('${ctx}/sysUser/vw_editPassword', "修改登录密码", 400, 250);
    /* layer.alert('编辑行：<br>'+ JSON.stringify(data)) */
  }
});
  $('#btnQuery').on('click', function() {
	    var type = $(this).data('type');
	    active[type] ? active[type].call(this) : '';
  });
});
</script>
<script type="text/html" id="barDemo">
  <a class="layui-btn layui-btn-xs" lay-event="editPassword"><i class="layui-icon"></i>修改登录密码</a>
</script>
</body>
</html>